package com.lanxin.config;

import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * mybatis-plus配置类 分页插件
 * @author cyh
 * @create 2025-09-17 10:18
 */
@Configuration
public class MyBatisPlusConfig {

    /**
     * 分页拦截器配置Bean
     *
     * @return PaginationInterceptor 分页拦截器实例，配置为MySQL方言类型
     */
    @Bean
    public PaginationInterceptor paginationInterceptor() {
        // 创建分页拦截器并设置数据库方言为MySQL
        return new PaginationInterceptor().setDialectType("mysql");
    }

}


